<!DOCTYPE html>
<html lang="en">
<style>
    ul.group-list li {
        white-space: nowrap;float: left;
        width: 150px; height: 25px;
        padding: 3px 5px;list-style-type: none;
        list-style-position: outside;border: 0px;margin: 0px;
    }
    input[type=checkbox], input[type=radio] {
        display: inline-block;
    }
</style>

{include file="Public/head"}

<body data-type="widgets">
<script src="/assets/js/theme.js"></script>
<div class="am-g tpl-g">

    {include file='Public:header'}
    {include file='Public:menu2'}



    <!-- 内容区域 -->
    <div class="tpl-content-wrapper" >
        <div class="row-content am-cf">
            <div class="row">

                <div class="am-u-sm-12 am-u-md-12 am-u-lg-8">
                    <div class="widget am-cf">
                        <div class="widget-head am-cf">
                            <div class="widget-title am-fl">旗舰店设置</div>
                            <div class="widget-function am-fr">
                                <a href="javascript:;" class="am-icon-cog"></a>
                            </div>
                        </div>
                        <div class="widget-body am-fr">

                            <form id="roleform" form="submit" class="am-form tpl-form-border-form tpl-form-border-br">
                                <div class="am-form-group">
                                    <label for="user-name" class="am-u-sm-3 am-form-label">折扣</label>
                                    <div class="am-u-sm-6">
                                        <input type="text" class="tpl-form-input" name="setting[1]" placeholder="请输入折扣" value="{notempty name='$data'}{$data.1.val}{/notempty}">
                                        <small>{$data.1.data}</small>
                                    </div>
                                </div>
                                <div class="am-form-group">
                                    <label for="user-name" class="am-u-sm-3 am-form-label">第一次购买量</label>
                                    <div class="am-u-sm-6">
                                        <input type="text" class="tpl-form-input" name="setting[2]" placeholder="请输入第一次购买量" value="{notempty name='$data'}{$data.2.val}{/notempty}">
                                        <small>{$data.2.data}</small>
                                    </div>
                                </div>
                                <div class="am-form-group">
                                    <label for="user-name" class="am-u-sm-3 am-form-label">清算时间</label>
                                    <div class="am-u-sm-1">
                                        <input type="text" class="tpl-form-input" name="setting[3]" placeholder="请输入时" value="{notempty name='$data'}{$data.3.val}{/notempty}">
                                        <!--<small>请填写6位以上英文或数字。</small>-->
                                    </div>
                                    <div class="am-u-sm-1">
                                        <input type="text" class="tpl-form-input" name="setting[4]" placeholder="请输入分" value="{notempty name='$data'}{$data.4.val}{/notempty}">
                                        <!--<small>请填写6位以上英文或数字。</small>-->
                                    </div>
                                </div>





                                <div class="am-form-group">
                                    <div class="am-u-sm-9 am-u-sm-push-3">
                                        <a onclick="javascript:history.back(-1);" ><input class="btn btn-default" type="reset" value="返回">&nbsp;&nbsp;&nbsp;&nbsp;</a>

                                        <input class="btn btn-info" type="submit"  value="提交">
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>

</body>

{include file='Public:script'}
{include file='Public:validation'}
<script>
    $(function () {
        $(document).on('input propertychange','[name="address"]', function() {
            search2();
        });
    });

    //提交
    function roleSubmit(){
        var form=document.getElementById("roleform");
        var formData=new FormData(form);
        $.ajax({
            url:"{:Url('setting')}",
            type:'POST',
            data:formData,
            async: false,
            cache: false,
            contentType: false, //不设置内容类型
            processData: false, //不处理数据
            success:function(res){
                if (res.code != 200) {
                    layer.msg(res.msg, {shade: 0.5, time: 2000,icon: 2});
                    return false;
                }
                layer.msg(res.msg, {shade: 0.5, time: 2000, icon: 1}, function(){
                    window.location.href=document.referrer;

                });
            }
        });
    }
</script>

</html>